/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EntidadesDBPrueba;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Facundo
 */
@Entity
@Table(name = "perfil", catalog = "tpare", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Perfil.findAll", query = "SELECT p FROM Perfil p"),
    @NamedQuery(name = "Perfil.findByIdPerfil", query = "SELECT p FROM Perfil p WHERE p.idPerfil = :idPerfil"),
    @NamedQuery(name = "Perfil.findByAniosExperiencia", query = "SELECT p FROM Perfil p WHERE p.aniosExperiencia = :aniosExperiencia"),
    @NamedQuery(name = "Perfil.findByEdad", query = "SELECT p FROM Perfil p WHERE p.edad = :edad"),
    @NamedQuery(name = "Perfil.findBySexo", query = "SELECT p FROM Perfil p WHERE p.sexo = :sexo")})
public class Perfil implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "idPerfil", nullable = false)
    private Integer idPerfil;
    @Basic(optional = false)
    @NotNull
    @Column(name = "aniosExperiencia", nullable = false)
    private int aniosExperiencia;
    @Basic(optional = false)
    @NotNull
    @Column(name = "edad", nullable = false)
    private int edad;
    @Column(name = "sexo")
    private Character sexo;

    public Perfil() {
    }

    public Perfil(Integer idPerfil) {
        this.idPerfil = idPerfil;
    }

    public Perfil(Integer idPerfil, int aniosExperiencia, int edad) {
        this.idPerfil = idPerfil;
        this.aniosExperiencia = aniosExperiencia;
        this.edad = edad;
    }

    public Integer getIdPerfil() {
        return idPerfil;
    }

    public void setIdPerfil(Integer idPerfil) {
        this.idPerfil = idPerfil;
    }

    public int getAniosExperiencia() {
        return aniosExperiencia;
    }

    public void setAniosExperiencia(int aniosExperiencia) {
        this.aniosExperiencia = aniosExperiencia;
    }

    public int getEdad() {
        return edad;
    }

    public void setEdad(int edad) {
        this.edad = edad;
    }

    public Character getSexo() {
        return sexo;
    }

    public void setSexo(Character sexo) {
        this.sexo = sexo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idPerfil != null ? idPerfil.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Perfil)) {
            return false;
        }
        Perfil other = (Perfil) object;
        if ((this.idPerfil == null && other.idPerfil != null) || (this.idPerfil != null && !this.idPerfil.equals(other.idPerfil))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "EntidadesDBPrueba.Perfil[ idPerfil=" + idPerfil + " ]";
    }
    
}
